Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a streaming indexer when fetching #628

Closed
wants to merge 12 commits into from

Conversation

carlosmn
Copy link
Member

This is the streaming indexer work and its integration in the current fetch code, which makes it work again on non-Windows systems and makes the git_remote_download() API a lot less stupid.

@nulltoken is this something you can wrap in the bindings easily?

@@ -89,6 +89,7 @@ void git_mwindow_scan_lru(
{
git_mwindow *w, *w_l;

puts("LRU");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

@carlosmn
Copy link
Member Author

Damn, I was sure the fixes had taken care of that

The new indexer needs to be able to bypass any kind of buffering, as
it's trying to map data that it has just written to disk.
This will allow us to index a packfile as soon as we receive it from
the network as well as storing it with its final name so we don't need
to pass temporary file names around.
Resolve any lingering deltas, write out the index file and rename the
packfile.
This changes the git_remote_download() API, but the existing one is
silly, so you don't get to complain.

The new API allows to know how much data has been downloaded, how many
objects we expect in total and how many we've processed.
Trying to send every single line immediately won't give us any speed
improvement and duplicates the code we need for other transports. Make
the git transport use the same buffer functions as HTTP.
This allows us to give updates on how it's doing
In the case that walk->one is NULL, we know that we have no positive
references, so we already know that the revwalk is over.
@carlosmn
Copy link
Member Author

It turns out I had broken clone for a bit, but now it works just fine.

@carlosmn carlosmn mentioned this pull request Apr 17, 2012
@vmg
Copy link
Member

vmg commented Apr 19, 2012

Merged manually.

@vmg vmg closed this Apr 19, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants